package com.sparrow.source.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sparrow.source.common.dto.IasUserQueryRequest;
import com.sparrow.source.persistense.IasUser;

import java.util.List;

/**
 * @author bryceyung
 * @since 2024/11/19
 */
public interface IIasUserService extends IService<IasUser> {

    /**
     * 根据uid获取用户信息
     *
     * @param uid
     * @return
     */
    IasUser getByUid(Integer uid);

    /**
     * 分页查询用户信息
     *
     * @param queryRequest
     * @param page
     * @return
     */
    IPage<IasUser> queryUserPage(IasUserQueryRequest queryRequest, Page<IasUser> page);

    /**
     * 批量新增或删除
     *
     * @param userList
     * @return
     */
    Boolean saveOrUpdateBatchByUid(List<IasUser> userList);

    /**
     * 查询人员详情
     *
     * @param userId
     * @return
     */
    IasUser getById(Integer userId);

    IasUser queryByUserOrPersonId(Long userId);

    Boolean delete(Integer userId);
}
